<?php
$session=new CHttpSession();
$session->open();
$i=$session['i'];
$p=Profiles::model()->findByPk($data->uid);
$u=Users::model()->findByPk($data->uid);
?>

<tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
    <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2"'; ?>"><a href="/index.php?r=article/view&menu=0&id=<?php echo $data->aid;?>"><?php echo $data->title;?></a></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo ($data->audit==1) ? '已审核' : (($data->audit==-1) ? '未通过审核':'未审核');?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
        <?php if(Yii::app()->user->id==1){?>
        <a href="/index.php?r=manage/index&cate=24&id=<?php echo $data->aid;?>">审核</a>
<!--        |-->
<!--        <a href="/index.php?r=manage/index&cate=--><?php //echo (isset($session['cid'])&&$session['cid']>0)  ? $session['cid'] : 12;?><!--&id=--><?php //echo $data->aid;?><!--">编辑</a>-->
        <?php }else{?>
        <a href="/index.php?r=manage/index&cate=12&id=<?php echo $data->aid;?>">编辑</a>
        <?php }?>
        |
        <a href="/index.php?r=manage/delxscj&id=<?php echo $data->aid;?>&cid=<?php
        echo Yii::app()->request->getParam('cate', 0);?>&iid=<?php
        echo Yii::app()->request->getParam('iid', 0);?>&pid=<?php
        echo Yii::app()->request->getParam('pid', 0);?>">删除</a>
    </td>
</tr>

<?php
$session['i']=$i+1;
?>